<template>
	<view class="content" :class="[vtheme]">
		<view class="text-area">
			<text class="title"  :class="[vtheme]">{{title}}</text>
		</view>
		<image class="logo" :src="`/static/${vtheme}/1.png`"></image>
		<view class="bg-test" :class="[vtheme]"></view>

		<view class="theme">
			<button type="default" class="button" @click="changeTheme('day-theme')">day</button>
			<button type="default" class="button" @click="changeTheme('night-theme')">night</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '使用class实现主题切换'
			}
		},

		methods: {
			changeTheme(theme){
				this.vGetTheme(theme);
			}
		}
	}
</script>

<style lang="scss" scoped>

	.content {
		height: 100%  !important;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		@include base-background();
	}

	.theme {
		width: 100%;
		display: flex;
		justify-content: center;
		padding: 0 20%;

		.button {
			width: 100px;
		}
	}
	.title{
		@include text-color();
	}

	.bg-test {
		width: 300px;
		height: 160px;
		border-radius: 10px;
		border: 1px solid;
		@include border-color();
	}

	.logo{
		width: 100px;
		height: 100px;
	}

</style>
